import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';

export default async function a012(fd: IFeidaoAiBrowserComponent, e: { currentTarget: HTMLSpanElement }) {
	// 删除
	const delete_type = e.currentTarget.getAttribute('delete-type');
	if (delete_type === '1') {
		const comment_numbering = e.currentTarget.getAttribute('data-comment-number');
		const post_numbering = get(fd, 'dynamic_id');
		const productid = get(fd, 'productid');
		fire('zj-000002', 'a001', {
			comment_numbering,
			post_numbering,
			productid,
			delete_type
		});
	} else if (delete_type === '2') {
		const reply_numbering = e.currentTarget.getAttribute('data-id');
		fire('zj-000002', 'a001', {
			reply_numbering, delete_type
		});
	}
}
